package com.cmdt.zw.springjms.producer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by think pad on 2017/9/16.
 */
public class AppProducer {
    public static void main(String args[])
    {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("producer.xml");
        ProducerService producerService = applicationContext.getBean(ProducerService.class);
        for(int i=0;i<100;i++)
        {
            producerService.sendMessage("test"+i);
        }
        applicationContext.close();
    }
}
